<template>
  <view>
    <u-navbar
      :background="{ background: '#111723' }"
      title-color="#fff"
      :title-bold="true"
      back-icon-color="#fff"
      :border-bottom="false"
    >
    </u-navbar>
    <web-view :src="url" v-if="type === '1'"></web-view>
    <view v-else class="rich"> <rich-text :nodes="url"></rich-text></view>
  </view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'

const url = ref()
const type = ref()
const content = ref()
onLoad((options) => {
  url.value = options.url
  type.value = options.type
})
</script>
<style lang="less" scoped>
.rich {
  padding: 30rpx;
  display: block;
  height: auto;
  padding: 30rpx;
  background-color: rgb(249, 249, 250);
}
</style>
